import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    children:[
      {
        path: 'shoye',
        name: 'shoye',
        component:()=>import('../views/home/home.vue')
      },
      {
        path: 'cart',
        name: 'cart',
        component:()=>import('../views/home/Cart.vue')
      },
      {
        path: 'favo',
        name: 'favo',
        component:()=>import('../views/home/favourite.vue')
      },
      {
        path: 'mess',
        name: 'mess',
        component:()=>import('../views/home/message.vue')
      },
      {
        path: 'noti',
        name: 'noti',
        component:()=>import('../views/home/notification.vue')
      },
    ]
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
